package com.zeros.latte.apps;

import android.content.Context;

import java.util.HashMap;
import java.util.WeakHashMap;

/**
 * 工具类  on 2018/1/26.
 */

public final class Latte {

    public static Configurator init(Context context){
        getConfiguration().put(ConfigType.APPLICATION_CONTEXT.name(), context.getApplicationContext());
        return Configurator.getInstance();
    }

    public static HashMap<String, Object> getConfiguration() {
        return Configurator.getInstance().getLatteConfigs();
    }

    public static Context getApplicationContext() {
        return (Context) getConfiguration().get(ConfigType.APPLICATION_CONTEXT.name());
    }

}
